<a href="/adminarea/codeemail/" class="sexybutton sexysimple sexymagenta"><span class="add">Add New Coupone Code</span></a><br />

<table width="100%" cellspacing="0" cellpadding="8" class="newsfeed" id="myTable" border="0"  valign="top">
<thead>
	<tr>
		<th>ID#</th>
		<th>Code</th>
		<th>Can be used</th>
		<th>Was used</th>
		<th>&nbsp;</th>
		<th>&nbsp;</th>
	</tr>
</thead>
<tbody>

	<?php
	foreach ($this->allCodes as $oItem)
	{
//	print_r($oItem);
		?>
	<tr id="row_<?php echo $oItem->id; ?>" valign="top">
		<td><?php echo $oItem->id; ?></td>
		<td class="{field: 'post_date'}"><?php echo $this->escape($oItem->code); ?></td>
		<td class="{field: 'cbu'}"><?php echo $this->escape($oItem->use_number); ?> time<?php  if (1 != $oItem->use_number) echo 's'?></td>
		<td class="{field: 'wu'}"><?php echo $this->escape(models_OrderMapper::getCouponcodeUseNumber($oItem->id)); ?> time<?php  if (1 != models_OrderMapper::getCouponcodeUseNumber($oItem->id)) echo 's'?></td>

		<td><a href="/adminarea/editcouponecode/id/<?php echo $oItem->id; ?>" class="sexybutton sexysimple sexymagenta"><span class="edit">Edit</span></a></td>
		<td class="del_code"><a id="<?php echo $oItem->id; ?>"
			href="javascript: void(0);" class="sexybutton sexysimple sexymagenta delete_code"><span class="delete">Delete</span></a></td>
	</tr>
	<?php
	}
	?>

</tbody>
</table>

	<?php echo $this->paginationControl($this->paginator, 'Sliding', 'pagination.phtml'); ?>